import React from 'react'
import { Layout,Collapse } from 'antd'
import 'antd/dist/antd.css'

import reqwest from 'reqwest';


function callback(key) {
    console.log(key);
  }

class Searches extends React.Component {
   
    state = {
        initLoading: true,
        userId: null,
        userData:{},
        bookList: [],
        sites:[]

    };

  
    componentDidMount() {
        console.log(this.props.match)
        let tempId=this.props.match.params.id
        console.log("tempid="+tempId)
        this.getData(tempId);
    }

    getData = (id) => {
        reqwest({
            url: `https://lessreads.com/renren-admin/api/recomuser/info/${id}`,
            type: 'json',
            method: 'get',
            contentType: 'application/json',
            success: res => {
                this.setState({
                    initLoading: false,
                    userData:res.recomUserVO.recomUser,
                    sites:res.recomUserVO.recomUser.siteUrls,
                    bookList:res.recomUserVO.recomEvaluationList
                    }
                );
                console.log(res)
            },
        });
    };

    render() {
        const{bookList,userData}=this.state
        return (
            <Layout style={{backgroundColor:"white"}}> 
                <div style={{backgroundColor:"white"}} className="recommender" >                                  
                    
                   {}
                </div>  
                
     </Layout>
             
        )
    }
}

export default Searches;
